﻿using System;
using System.Text.RegularExpressions;

class ReplaceListOfWords
{
    static void Main()
    {
        string text = "Microsoft announced its next generation PHP compiler today. It is based on .NET Framework 4.0 and is implemented as a dynamic language in CLR.";

        string[] forbidenWords = { "PHP", "CLR", "Microsoft" };

        string result = text;

        for (int i = 0; i < forbidenWords.Length; i++)
        {
            result = Regex.Replace(result, @"\b" + forbidenWords[i] + @"\b", new string('*', forbidenWords[i].Length));           
        }

        Console.WriteLine(result);
    }
}